{% extends 'layout.html' %}
{% load static %}
{% block css %}
<link rel="stylesheet" href="{% static 'plugins/bootstrap-datetimepicker-master/bootstrap-datetimepicker-master/css/bootstrap-datetimepicker.min.css' %}">
{% endblock %}
{% block content %}
<div class="container">
{#        创建面板#}
        <div class="panel panel-default">
          <div class="panel-heading">
            <h3 class="panel-title">新建用户 </h3>
          </div>
          <div class="panel-body">
{#            面板内容写表单#}
              <form method="post" novalidate>
                  {% csrf_token %}
                  {% for item in form %}
                  <div class="form-group">
                  <label>{{ item.label }} </label>
                      {{ item }}
                  <span style="color: red">{{ item.errors.0 }}</span>
                  </div>
                  {% endfor %}


          <button type="submit" class="btn btn-primary">提 交</button>
        </form>
          </div>
        </div>
    </div>
{% endblock %}
{% block js %}
    <script  src="{% static 'plugins/bootstrap-datetimepicker-master/bootstrap-datetimepicker-master/js/bootstrap-datetimepicker.js' %}"></script>
    <script  src="{% static 'plugins/bootstrap-datetimepicker-master/bootstrap-datetimepicker-master/js/locales/bootstrap-datetimepicker.zh-CN.js' %}"></script>
<script>
    $(function (){
        $('#id_create_time').datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
});
    })
</script>
{% endblock %}